package com.example.abc.repository;

import com.example.abc.dto.account.AccountAuthSaveDto;
import com.example.abc.dto.account.AuthorityTreeDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.example.abc.entity.UserAuthority;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface UserAuthorityDao {
    int insert(@Param("pojo") UserAuthority pojo);

    int insertList(@Param("pojos") List<UserAuthority> pojo);

    List<UserAuthority> findByUid(@Param("uid")String uid);

    List<AuthorityTreeDto> getUserAuthTree(@Param("uid")String uid);

    void saveAccountAuth(@Param("uid")String uid,@Param("authorityIds")List<Long> authorityIds);

    void deleteByUid(@Param("uid")String uid);

}
